/** Created by CUIJA on 05-19-2017.*/

var angular = require('angular');


var coreRoutes = require('./routes/core.routes');

var navMenuService = require('./services/menu.service');
var orderService = require('./../services/order.service');
var deliverInfoService = require('./../services/deliverInfo.service');
var clientService = require('./../services/client.service');

var navbarController = require('./components/navbar/navbar.controller');

var payCtrl = require('./layouts/pay/pay.controller');
var orderdetailCtrl = require('./layouts/orderdetail/orderdetail.controller');
var orderlistCtrl = require('./layouts/orderlist/orderlist.controller');
var addradminCtrl = require('./layouts/addradmin/addradmin.controller');

var addrModalCtrl = require('./layouts/pay/addr.controller');
var cancelModalCtrl = require('./layouts/orderdetail/cancelmodal.controller');
var receiveModalCtrl = require('./layouts/orderdetail/receivemodal.controller');
var navbarComponent = require('./components/navbar/navbar');

var WelcomeCtrl = require('./layouts/welcome/welcome.controller');
var merchantService = require('../services/merchant.service.js');
var foodService = require('../services/food.service.js');

var FoodCtrl = require('./layouts/food/food.controller');
var foodModalCtrl = require('./layouts/food/food.model.controller')

var CartCtrl = require('./layouts/cart/cart.controller');
const moduleName = 'core';

angular.module(moduleName, [])
  .config(coreRoutes)
  .factory('navMenuService', navMenuService)
  .factory('merchantService',merchantService)
  .factory('foodService',foodService)
  .factory('orderService', orderService)
  .factory('deliverInfoService', deliverInfoService)
  .factory('clientService',clientService)

  .component('navbar', navbarComponent)

  .controller('navbarController', navbarController)
  .controller('PayCtrl',payCtrl)
  .controller('orderdetailCtrl',orderdetailCtrl)
  .controller('WelcomeCtrl', WelcomeCtrl)
  .controller('foodCtrl',FoodCtrl)
  .controller('CartCtrl', CartCtrl)
  .controller('orderlistCtrl',orderlistCtrl)
  .controller('addradminCtrl',addradminCtrl)

  .controller('addrModalCtrl',addrModalCtrl)
  .controller('foodModalCtrl',foodModalCtrl)
  .controller('cancelModalCtrl',cancelModalCtrl)
  .controller('receiveModalCtrl',receiveModalCtrl)
;

module.exports = moduleName;